package com.clkj.xiuzheng.service;

import com.clkj.xiuzheng.dao.ProductStocksMapper;
import com.clkj.xiuzheng.pojo.ProductStock;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductStocksServiceImpl implements ProductStocksService{
    @Autowired
    ProductStocksMapper productStocksMapper;

    @Override
    public  List<ProductStock>  listProductStock(String productStockName,Integer companyId) {
        List<ProductStock> productStocks = productStocksMapper.listProductStock(productStockName,companyId);
//        for (ProductStock productStock : productStocks) {
//          String warehouseName = productStocksMapper.getWarehouseNameById(productStock.getWarehouseId());
//          productStock.setWarehouseName(warehouseName);
//        }
        return productStocks;
    }
}
